<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "product_attr".
 *
 * @property int $id
 * @property int $product_id 产品id
 * @property int $attr_name_id 属性名id
 * @property int $attr_value_id 属性值id
 */
class ProductAttr extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'product_attr';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['product_id', 'attr_name_id', 'attr_value_id'], 'required'],
            [['product_id', 'attr_name_id', 'attr_value_id'], 'integer'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'product_id' => Yii::t('app', 'Product ID'),
            'attr_name_id' => Yii::t('app', 'Attr Name ID'),
            'attr_value_id' => Yii::t('app', 'Attr Value ID'),
        ];
    }
}
